home *** CD-ROM | disk | FTP | other *** search
- -- card: 4467 from stack: in
- -- bmap block id: 5154
- -- flags: 4000
- -- background id: 4114
- -- name: a,b known
- ----- HyperTalk script -----
- on mouseUp
- --Calculate Hypotenuse
- set numberFormat to <0.000000>
- put card field "side a"^2 into mem1
- add card field "side b"^2 to mem1
- put sqrt(mem1) into card field "side c"
-
- --Calculate Tan A
- get card field "side a"
- put it into mem3
- get card field "side b"
- put it into mem4
- get mem3/mem4
- put it into mem5
- put it into card field "tan A"
-
- --Calculate Sin A
- get card field "side a"
- put it into mem6
- get card field "side c"
- put it into mem7
- get mem6/mem7
- put it into mem8
- put it into card field "sin A"
-
- --Calculate Cos A
- get mem8/mem5
- put it into mem9
- put it into card field "cos A"
-
- --Calculate Angle A
- get atan((card field "side a")/(card field "side b"))*(180/pi)
- put it into card field "angle A"
-
- --Calculate Angle B
- get bkgnd field "angle C"-card field "angle A"
- put it into card field "angle B"
-
- --Calculate Area
- get card field "side a"*card field "side b"/2
- put it into bkgnd field "Area"
-
- --Calculate Perimeter
- get card field "side a"+card field "side b"+card field "side c"
- put it into bkgnd field "Perimeter"
- end mouseUp
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=347 top=146 right=163 bottom=475
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side a
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=112 top=263 right=280 bottom=240
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side b
-
-
- -- part 4 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=51 top=135 right=154 bottom=184
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: side c
-
-
- -- part 6 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=245 top=85 right=104 bottom=373
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle B
-
-
- -- part 7 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=22 top=215 right=234 bottom=150
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle A
-
-
- -- part 9 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=387 top=208 right=220 bottom=447
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: tan A
-
-
- -- part 10 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=387 top=224 right=236 bottom=447
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: sin A
-
-
- -- part 11 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=387 top=240 right=252 bottom=447
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: cos A
-
-
- -- part contents for card part 2
- ----- text -----
- 1
-
- -- part contents for card part 3
- ----- text -----
- 1
-
- -- part contents for card part 4
- ----- text -----
- 1.414214
-
- -- part contents for card part 7
- ----- text -----
- 45.000000
-
- -- part contents for card part 9
- ----- text -----
- 1.000000
-
- -- part contents for card part 10
- ----- text -----
- 0.707107
-
- -- part contents for card part 11
- ----- text -----
- 0.707107
-
- -- part contents for card part 6
- ----- text -----
- 45.000000
-
- -- part contents for background part 3
- ----- text -----
- 90
-
- -- part contents for background part 5
- ----- text -----
- 0.500000
-
- -- part contents for background part 9
- ----- text -----
- 3.414214